#符达康
from flask import Flask,render_template, request

app = Flask(__name__)

@app.route('/') # 获取登录页面
def index():
    return render_template('login.html')


@app.route('/hmc') # 获取学生花名册页面
def indexc():
    return render_template('hmc.html')




@app.route('/login', methods=['POST'])
def login():
    username = request.form['username']
    password = request.form['password']
    # 在这里可以编写验证逻辑，比如检查用户名密码是否正确
    if username == 'king' and password == '154154':
        return render_template('hmc.html',message='Login successful')
    else:
        return render_template('login.html',message='Login failed')
        

if __name__ == '__main__':
    app.run(debug=True,host='0.0.0.0',port=80)
